]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
popupMenu: Use SEPARATOR a11y role for SeparatorMenuItems
authorFlorian Müllner <fmuellner@gnome.org>
Wed, 25 Jun 2025 11:53:50 +0000 (13:53 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Wed, 25 Jun 2025 11:56:50 +0000 (13:56 +0200)
SeparatorMenuItems are not activatable, so SEPARATOR is a more
appropriate role than MENU_ITEM.

This is also what GTK3 does with GtkSeparatorMenuItem.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3773>

js/ui/popupMenu.js

index 39f6d7802c65abf82429c9119835ac1c5ef97dd5..a068ced5ef94a1402ccc07a4c6355158db5d6696 100644 (file)
@@ -308,6 +308,7 @@ class PopupSeparatorMenuItem extends PopupBaseMenuItem {
         this.label = new St.Label({text: text || ''});
         this.add_child(this.label);
         this.label_actor = this.label;
+        this.accessible_role = Atk.Role.SEPARATOR;
 
         this.label.connect('notify::text',
             this._syncVisibility.bind(this));